package com.pic.mgt.cli;

import org.apache.commons.cli.Option;
import org.apache.commons.cli.OptionBuilder;
import org.apache.commons.cli.Options;

public final class IgalaxyCLI extends CommandLineArgParser {

	@Override
	protected void addOptions(Options options) {
		// addOption() 方法的第二個參數表示，該參數是否有值。
		
		options.addOption("launch", true,
						  "Load i-galaxy system on for 'haishin' or 'syushin'.");
		
		options.addOption("start", false,
						  "Start i-galaxy execution. (The '-launch' parameter must be used first.)");
		
		options.addOption("recover", false,
				          "Waiting for a system delay time, and then do auto system recovery process.");
		
		Option property  = OptionBuilder.withArgName( "property=value" )
        								.hasArgs(2)
        								.withValueSeparator()
        								.withDescription( "use value for given property" )
        								.create( "D" );
		options.addOption(property);
	}

}
